includes Header;

configuration KeyUpdate
{
}
implementation
{
	components Main,ProcessM,LedsC,GenericComm,TimerC,RandomLFSR,Logger;//UARTComm,//,Logger;

	Main.StdControl->ProcessM.StdControl;

	ProcessM.CommControl->GenericComm;
    
    /*	
    	interface SendMsg as TopoSendMsg;
		interface ReceiveMsg as TopoReceiveMsg;
    */
    ProcessM.CmdSendMsg -> GenericComm.SendMsg[CMDPORT];
    ProcessM.CmdReceiveMsg -> GenericComm.ReceiveMsg[CMDPORT];

	/*
    	interface SendMsg as CmdSendMsg;
    	interface ReceiveMsg as CmdReceiveMsg;
	*/
    ProcessM.TopoSendMsg -> GenericComm.SendMsg[TOPOPORT];
    ProcessM.TopoReceiveMsg -> GenericComm.ReceiveMsg[TOPOPORT];

    /*
    	interface SendMsg as DataSendMsg;
    	interface ReceiveMsg as DataReceiveMsg;
    */
    ProcessM.DataSendMsg -> GenericComm.SendMsg[DATAPORT];
    ProcessM.DataReceiveMsg -> GenericComm.ReceiveMsg[DATAPORT];

    ProcessM.LogSendMsg -> GenericComm.SendMsg[LOGPORT];
    ProcessM.LogReceiveMsg -> GenericComm.ReceiveMsg[LOGPORT];

    //ProcessM.UARTSend->UARTComm.SendMsg[30];
    //ProcessM.UARTReceive->UARTComm.ReceiveMsg[8];

    ProcessM.BootTimer -> TimerC.Timer[unique("Timer")];
	ProcessM.ClockTimer->TimerC.Timer[unique("Timer")];
	ProcessM.TopoTimer -> TimerC.Timer[unique("Timer")];
    ProcessM.TransferTimer -> TimerC.Timer[unique("Timer")];

    ProcessM.Random -> RandomLFSR.Random;

	ProcessM.Leds->LedsC;

	ProcessM.LoggerRead->Logger.LoggerRead;
	ProcessM.LoggerWrite->Logger.LoggerWrite;
	ProcessM.LogControl->Logger.StdControl;
}
